#!/bin/bash

function usage() {
    echo "$( basename $0 ) [-1 | -2]"
    echo "    Connect to qemu with ssh"
    echo "    参数说明:"
    echo "        -1: 连接qemu实例1, 默认"
    echo "        -2: 连接qemu实例2"
    exit
}

set -e 

qemu=1

while getopts ":12" args
do
    case "$args" in
        1)
            qemu=1
            ;;
        2)
            qemu=2
            ;;
        *)
            usage
            ;;
    esac
done

echo ssh -o StrictHostKeyChecking=no root@fd00::eb:${qemu}
ssh -o StrictHostKeyChecking=no root@fd00::eb:${qemu}
